package com.guestbook.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.entity.Admin;
import com.guestbook.biz.AdminBiz;
import com.guestbook.dao.AdminDao;

@Service("adminBiz")
public class AdminBizImp implements AdminBiz
{
    @Autowired
    private AdminDao adminDao;

    public Admin findById(Integer id)
    {
        return  adminDao.findById(id);
        
    }

    public List<Admin> findAll()
    {
        return adminDao.findAll();
    }

    public Admin save(Admin entity)
    {
        adminDao.save(entity);
        return entity;
    }

    public Admin update(Admin entity)
    {
        adminDao.update(entity);
        return entity;
    }

    public void deleteById(Integer id)
    {
       adminDao.deleteById(id);
    }

    public Admin checkPass(Admin admin)
    {
        return adminDao.checkPass(admin);
    }

    

}
